{
    console.log(0b111110111);
    console.log(0o767);
}

//  Number.isFinite()判断是否有效(有尽头)
//  Number.isNaN()判断是否为数字
{
    console.log('15', Number.isFinite(15))
    console.log('NaN', Number.isFinite(NaN))
    console.log('1/0', Number.isFinite('true' / 0));

    console.log('NaN', Number.isNaN(NaN));
    console.log('0', Number.isNaN(0));
}

//  Number.isInteger()判断是否为整数，参数类型必须为number
{
    console.log('25', Number.isInteger(25));
    console.log('25.0', Number.isInteger(25.0));
    console.log('25.1', Number.isInteger(25.1));
    console.log('25', Number.isInteger('25'));
}

//  Number.MAX_SAFE_INTEGER为数字最大值
//  Number.MIN_SAFE_INTEGER为数字最小值
//  Number.isSafeInteger判断时候安全
{
    console.log(Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER);
    console.log('10', Number.isSafeInteger(10));
    console.log('a', Number.isSafeInteger('a'));
}

//  Math.trunc()取整
{
    console.log(4.1, Math.trunc(4.1));
    console.log(4.9, Math.trunc(4.9));
}

//  Math.sign()根据返回值判断
//  -1  负数
//  0   0
//  1   正数
//  NaN 不是数字
{
    console.log('-5', Math.sign(-5));
    console.log('0', Math.sign(0));
    console.log('5', Math.sign(5));
    console.log('foo', Math.sign('foo'));
}

//  Math.cbrt()计算立方根
{
    console.log('-1', Math.cbrt(-1));
    console.log('8', Math.cbrt(8));
}

